Skip to main content

Executive Summary

Melissa's wishlist

Things to include in CCTV Executive Summary and High level documents.

  1. Quick Blurb on what the project is about. (Links to our marketing material to be added by Jake)
  2. High Level overview of CCTV.
  3. Difference Between CV and ML
    1. How we use both in CCTV.
  4. Any Terms that are The same over a model.
  5. Models, Training, Testing, and Prediction what is what and how GQC handles the training and testing datasets.
  6. Links to the papers and presentations.
  7. Link to converted markdowns from Vannary's Metadata doc and data org. doc.

Other Documents: 6. List of Virtual Envs and what specifically they are meant for. 7. Where source material is located.

  1. Datasets
  2. Databases
  3. Notes

In ML and CV What are py Files and what are notebooks. We do not change Py files. The Pyfile from Notebook 7 for ML has been edited. This is an exception.

CV Pipeline

The CV pipeline trains a model and calculates inferences using three repositories.

The CV pipeline is comprised of two repositories: gqc-utility-notebooks and compute-msi. The gqc-utility-notebooks repository processes the received inspection data, generating training and testing CSV files along with blurred frames used for both training and inference. The compute-msi repository utilizes these training and testing CSVs, as well as the blurred frames, to train either a one-stage or two-stage CV model. It also contains scripts for model inference once the training is complete.

Apart from the gqc-utility-notebooks and compute-msi repositories, we use the cctv-apps repository to load images on a carousel and run inferencing using the model on an image-by-image basis.

It is important to use the 11 notebooks from the gqc-utility-notebooks repository (which are described in the following section) and then the relevant .py files from the compute-msi repository.

::: warning The CCTV CV notebooks are run on a dataset by dataset basis. You have to specify the dataset to run in the .yml file. :::

Notebook OrderNotebook NamePython File NameDescription
1cctv-video_list-creator.ipynbvideo_list_creator.pyThis module forms Video-Groups and creates video lists based on that. This considers subfolders inside Recieved Data folder as the Video-Groups and all video files inside those subfolders are added as Video-Group members recursively.
2metadata_DB_extract_inspection_condition_data.ipynbextract_inspection_condition_data.pyThis module takes the inspection database (which can either be .mdb or .dbf) and creates a condition data CSV file called all_conditions.csv
3cctv-import_supplementary_data.ipynbimport_suppl_data.pyThis module import distance regions, video-types, Condition_code_standard, and all_conditions CSV files into Video_DB as separate tables. It also updates videos table's video-type column.
4cctv-frame-extraction.ipynbframe_extractor.pyThis module extracts frames from a list of videos and saves them under a zip file.
5cctv-full-frame-stitch-and-Azure-OCR.ipynbstitch_and_ocr.pyThis will do the following:Run Azure OCR on 6 stacked full frames,The OCR results will be saved to OCR_JSON column in the frames table which can be used for blurring in the next stage.
6cctv-save-blurred-frames.ipynbblur_frames.pyThis module takes in the extracted frames and the CSV files generated by cctv-frame-extraction.ipynb utility and recognize the text present in the frames.
7cctv-extract-distance-values.ipynbextract_distance_values.pyThis module takes in the OCR_JSON column in the frames table containing OCR results and extracts the distance values
8cctv-distance-value-post-processing.ipynbdistance_postprocessor.pyThis module processes the distance values detected by OCR to remove outliers and fill in the frames without distances by linear interpolation and extrapolation.
9cctv-extract-condition_codes.ipynbextract_condition_codes.pyThis module takes in the OCR_JSON column in the frames table containing OCR results and extracts condition codes.
10cctv_SD1_label_images.ipynbSD1_label_images.pyThis notebook is used to assign condition codes to each frame.
11cctv-prepare-cctv-training-csv.ipynbtraining_data_splitter.pyThis module creates the correct data split between training, validation and test and writes the training, validation, and test into the sqlite3 database.

ML Pipeline

Details for this pipeline specific to DNV are available here